﻿using System;
using XSTDZ.ERP.Application.DataContracts;
using System.Collections.Generic;

namespace XSTDZ.ERP.Application
{
    /// <summary>
    /// 字码表服务类(程序中会用，写入程序)
    /// </summary>
    public interface IRefeService
    {
        void AddRefe(Guid refeTypeId, RefeDto refeDto);

        void UpdateRefeTypeState(Guid refeTypeId);
        void UpdateRefeState(Guid refeId);

        RefeTypeDto GetRefeTypeDto(Guid refeTypeId);
        RefeDto GetRefeDto(Guid refeId);
        IEnumerable<RefeDto> GetRefeDtos(Guid refeTypeId);
        IEnumerable<RefeDto> GetRefeDtosByModuleName(string moduleName);
        IEnumerable<RefeTypeDto> GetAllRefeTypeDtos();

        /// <summary>
        /// 操作业务单号
        /// </summary>
        /// <param name="moduleName"></param>
        /// <param name="refeDto"></param>
        string GetNextBuessionDh(string buesssionTypeName,string currentDh,bool isUpdate);

        #region 数据备份
        /// <summary>
        /// 数据库备份设置
        /// </summary>
        /// <param name="dataBackDto"></param>
        /// <returns></returns>
        bool DataBaseBackUp(DataBackDto dataBackDto);
        /// <summary>
        /// 获取数据库备份设置(表中仅有一条数据）
        /// </summary>
        /// <returns></returns>
        DataBackDto GetDataBackDto();
        #endregion
    }
}
